package com.synjones.wschool.face.service.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.synjones.wschool.common.exception.BizException;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * Created by 24398 on 2018/8/3.
 */
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
public class GateInfoUserFaceReq {
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date date;
    private String gateNO;
    public   void checkParam(){
        if(this.date == null){
           throw new BizException("参数date不能为空");
        }else if(this.gateNO == null){
            throw new BizException("参数gateNO不能为空");
        }
    }
}
